//
//  NSDateFormatter+ICT.m
//  iCareTek
//
//  Created by MikeZhou on 14-5-22.
//  Copyright (c) 2014年 iCareTech. All rights reserved.
//

#import "NSDateFomatter+YWK.h"

@implementation NSDateFormatter (YWK)

+ (NSDateFormatter *)YMDPointDateFormatter
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:@"yyyy.MM.dd"];
    [dayFormatter setTimeZone:[NSTimeZone systemTimeZone]];
    return dayFormatter;
}

//数据同步的时间格式 年月日时分秒
+ (NSDateFormatter *)BLEDateFormatter
{
    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
    [formatter setDateFormat:@"yyyyMMddHHmmss"];
    formatter.timeZone = [NSTimeZone systemTimeZone];
    return formatter;
}

+ (NSDateFormatter *)BLEDateFormatterHM
{
    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
    [formatter setDateFormat:@"HH:mm"];
    formatter.timeZone = [NSTimeZone systemTimeZone];
    return formatter;
}

+ (NSDateFormatter *)MDPointDateFormatter
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:@"MM.dd"];
    return dayFormatter;
}

+ (NSDateFormatter *)trendsDateFormatter
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:@"HH:mm:ss"];
    return dayFormatter;
}

+ (NSDateFormatter *)warnHistoryFormatter
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:@"yyyy/MM/dd HH:mm"];
    return dayFormatter;
}

+ (NSDateFormatter *)reportDetailFormatter
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:@"yyyy.MM.dd HH:mm"];
    return dayFormatter;
}


+ (NSDateFormatter *)snoringInfoDateFormat
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:@"yyyy/MM/dd HH:mm:ss"];
    return dayFormatter;
}

+ (NSDateFormatter *)ymdhmsDashFormatter
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
    return dayFormatter;
}

+ (NSDateFormatter *)ymdhmsSDashFormatter
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss SSS"];
    return dayFormatter;
}

+ (NSDateFormatter *)ymdhmDashFormatter
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
    return dayFormatter;
}

+ (NSDateFormatter *)ymdDashFormatter
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:@"yyyy-MM-dd"];
    return dayFormatter;
}

+ (NSDateFormatter *)chineseYmd
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:NSLocalizedString(@"yyyy年MM月dd日", nil)];
    return dayFormatter;
}

+ (NSDateFormatter *)chineseYm
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:NSLocalizedString(@"yyyy年 MM月", nil)];
    return dayFormatter;
}

+ (NSDateFormatter *)chineseMd
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:NSLocalizedString(@"MM月dd日", nil)];
    return dayFormatter;
}

+ (NSDateFormatter *)chineseYmdhm
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:NSLocalizedString(@"yyyy年MM月dd日 HH:mm", nil)];
    return dayFormatter;
}

+ (NSDateFormatter *)chinesemdhm
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:NSLocalizedString(@"MM月dd日 HH:mm", nil)];
    return dayFormatter;
}


+ (NSDateFormatter *)healthManageYmd
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:NSLocalizedString(@"yyyy MM.dd", nil)];
    return dayFormatter;
}

/**
 *  @brief	yyyy
 */
+ (NSDateFormatter *)yearFormatter
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:NSLocalizedString(@"yyyy", nil)];
    return dayFormatter;
}

/**
 *  @brief	MM
 */
+ (NSDateFormatter *)monthFormatter
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:NSLocalizedString(@"MM", nil)];
    return dayFormatter;
}

/**
 *  @brief	dd
 */
+ (NSDateFormatter *)dayFormatter
{
    NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
    [dayFormatter setDateFormat:NSLocalizedString(@"dd", nil)];
    return dayFormatter;
}
@end













